package com.jvm;

import java.util.ArrayList;

/**
 * 堆溢出演示
 */
public class HeapTest {

    byte[] bytes = new byte[1023*100]; // 100KB

    public static void main(String[] args)throws Exception {
        ArrayList<HeapTest> heapTests = new ArrayList<>();
        while (true) {
            heapTests.add(new HeapTest());
            // Thread.sleep(100);
        }
    }
}
